Skip to content

Fix the cursor expanding result set bug #6166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 21, 2022
Merged

Conversation

wu-hui
Copy link
Contributor

@wu-hui wu-hui commented Apr 19, 2022

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Apr 19, 2022

⚠️ No Changeset found

Latest commit: 8e353c6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wu-hui wu-hui requested a review from ehsannas April 19, 2022 15:24
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 19, 2022

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (9417675)Merge (9d73ac2)Diff
    browser253 kB253 kB+251 B (+0.1%)
    esm5314 kB314 kB+217 B (+0.1%)
    main505 kB505 kB+158 B (+0.0%)
    module253 kB253 kB+251 B (+0.1%)
    react-native253 kB253 kB+251 B (+0.1%)
  • @firebase/firestore-lite

    TypeBase (9417675)Merge (9d73ac2)Diff
    browser73.1 kB73.3 kB+131 B (+0.2%)
    esm586.5 kB86.7 kB+129 B (+0.1%)
    main126 kB126 kB+245 B (+0.2%)
    module73.1 kB73.3 kB+131 B (+0.2%)
    react-native73.3 kB73.5 kB+131 B (+0.2%)
  • @firebase/functions

    TypeBase (9417675)Merge (9d73ac2)Diff
    browser8.99 kB9.39 kB+397 B (+4.4%)
    esm511.1 kB11.5 kB+414 B (+3.7%)
    main11.8 kB12.4 kB+529 B (+4.5%)
    module8.99 kB9.39 kB+397 B (+4.4%)
  • @firebase/functions-compat

    TypeBase (9417675)Merge (9d73ac2)Diff
    browser1.68 kB1.79 kB+111 B (+6.6%)
    esm51.83 kB1.98 kB+148 B (+8.1%)
    main2.20 kB2.34 kB+137 B (+6.2%)
    module1.68 kB1.79 kB+111 B (+6.6%)
  • bundle

    13 size changes

    TypeBase (9417675)Merge (9d73ac2)Diff
    firestore (Persistence)263 kB263 kB+251 B (+0.1%)
    firestore (Query Cursors)203 kB203 kB+178 B (+0.1%)
    firestore (Query)204 kB204 kB+178 B (+0.1%)
    firestore (Read data once)192 kB192 kB+178 B (+0.1%)
    firestore (Realtime updates)194 kB195 kB+178 B (+0.1%)
    firestore (Transaction)177 kB177 kB+178 B (+0.1%)
    firestore (Write data)176 kB176 kB+178 B (+0.1%)
    firestore-lite (Query Cursors)66.3 kB66.3 kB+13 B (+0.0%)
    firestore-lite (Query)69.4 kB69.5 kB+131 B (+0.2%)
    firestore-lite (Read data once)53.9 kB53.9 kB+15 B (+0.0%)
    firestore-lite (Transaction)71.2 kB71.2 kB+15 B (+0.0%)
    firestore-lite (Write data)56.6 kB56.6 kB+15 B (+0.0%)
    functions (call)27.6 kB27.6 kB+40 B (+0.1%)

  • firebase

    TypeBase (9417675)Merge (9d73ac2)Diff
    firebase-compat.js779 kB780 kB+424 B (+0.1%)
    firebase-firestore-compat.js304 kB305 kB+245 B (+0.1%)
    firebase-firestore-lite.js250 kB250 kB+234 B (+0.1%)
    firebase-firestore.js824 kB824 kB+291 B (+0.0%)
    firebase-functions-compat.js7.95 kB8.12 kB+169 B (+2.1%)
    firebase-functions.js31.1 kB32.0 kB+947 B (+3.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/GAwGUUZcJa.html

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 19, 2022

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • AbstractUserDataWriter

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size23.9 kB23.9 kB+15 B (+0.1%)
      size-with-ext-deps81.7 kB81.7 kB+15 B (+0.0%)
    • Transaction

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size42.4 kB42.4 kB+15 B (+0.0%)
      size-with-ext-deps100 kB100 kB+15 B (+0.0%)
    • WriteBatch

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size39.2 kB39.3 kB+15 B (+0.0%)
      size-with-ext-deps97.1 kB97.2 kB+15 B (+0.0%)
    • addDoc

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size110 kB110 kB+178 B (+0.2%)
      size-with-ext-deps169 kB169 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      19 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      + Nt

    • deleteDoc

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size101 kB101 kB+178 B (+0.2%)
      size-with-ext-deps160 kB160 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      16 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mi
      wt
      x

      17 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mi
      wt
      x

      + Nt

    • disableNetwork

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size89.4 kB89.6 kB+178 B (+0.2%)
      size-with-ext-deps148 kB149 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      wt
      x

      15 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      wt
      x

      + Nt

    • enableIndexedDbPersistence

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size165 kB166 kB+251 B (+0.2%)
      size-with-ext-deps225 kB225 kB+251 B (+0.1%)
    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size197 kB197 kB+251 B (+0.1%)
      size-with-ext-deps257 kB257 kB+251 B (+0.1%)
    • enableNetwork

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size89.4 kB89.6 kB+178 B (+0.2%)
      size-with-ext-deps148 kB149 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      wt
      x

      15 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      wt
      x

      + Nt

    • executeWrite

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size99.9 kB100 kB+178 B (+0.2%)
      size-with-ext-deps159 kB159 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      16 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mi
      wt
      x

      17 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mi
      wt
      x

      + Nt

    • getDoc

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size126 kB126 kB+178 B (+0.1%)
      size-with-ext-deps185 kB185 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      19 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      + Nt

    • getDocFromCache

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size82.5 kB82.7 kB+178 B (+0.2%)
      size-with-ext-deps140 kB141 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Xn
      ic
      jn
      mh
      wt
      x

      15 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Xn
      ic
      jn
      mh
      wt
      x

      + Nt

    • getDocFromServer

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size126 kB126 kB+178 B (+0.1%)
      size-with-ext-deps185 kB185 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      19 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      + Nt

    • getDocs

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size128 kB128 kB+178 B (+0.1%)
      size-with-ext-deps187 kB187 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      19 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      + Nt

    • getDocsFromCache

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size90.0 kB90.2 kB+178 B (+0.2%)
      size-with-ext-deps148 kB148 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Xn
      ic
      jn
      mh
      wt
      x

      15 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Xn
      ic
      jn
      mh
      wt
      x

      + Nt

    • getDocsFromServer

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size127 kB128 kB+178 B (+0.1%)
      size-with-ext-deps186 kB187 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      19 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      + Nt

    • loadBundle

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size98.3 kB98.5 kB+178 B (+0.2%)
      size-with-ext-deps157 kB158 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      wt
      x

      15 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      wt
      x

      + Nt

    • namedQuery

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size76.0 kB76.2 kB+178 B (+0.2%)
      size-with-ext-deps134 kB134 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      13 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Xn
      ic
      jn
      wt
      x

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Xn
      ic
      jn
      wt
      x

      + Nt

    • onSnapshot

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size128 kB128 kB+178 B (+0.1%)
      size-with-ext-deps187 kB187 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      19 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      cs
      hs
      ic
      jn
      mh
      mi
      wt
      x

      + Nt

    • onSnapshotsInSync

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size118 kB118 kB+178 B (+0.2%)
      size-with-ext-deps177 kB177 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      17 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      cs
      hs
      ic
      jn
      mi
      wt
      x

      18 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      cs
      hs
      ic
      jn
      mi
      wt
      x

      + Nt

    • queryEqual

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size25.9 kB25.9 kB+13 B (+0.1%)
      size-with-ext-deps83.7 kB83.8 kB+13 B (+0.0%)
    • runTransaction

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size110 kB110 kB+178 B (+0.2%)
      size-with-ext-deps169 kB169 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      16 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mh
      wt
      x
      zc

      17 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mh
      wt
      x
      zc

      + Nt

    • setDoc

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size109 kB109 kB+178 B (+0.2%)
      size-with-ext-deps168 kB168 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      19 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      + Nt

    • snapshotEqual

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size32.7 kB32.7 kB+13 B (+0.0%)
      size-with-ext-deps90.5 kB90.6 kB+13 B (+0.0%)
    • updateDoc

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size109 kB110 kB+178 B (+0.2%)
      size-with-ext-deps168 kB169 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      19 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      + Nt

    • waitForPendingWrites

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size89.8 kB90.0 kB+178 B (+0.2%)
      size-with-ext-deps149 kB149 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      14 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      wt
      x

      15 dependencies

      Bn
      D
      G
      Gn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      wt
      x

      + Nt

    • where

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size40.7 kB40.9 kB+181 B (+0.4%)
      size-with-ext-deps98.6 kB98.8 kB+180 B (+0.2%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      11 dependencies

      Bn
      D
      G
      It
      Ln
      N
      ic
      mh
      wt
      x
      zc

      12 dependencies

      Bn
      D
      G
      It
      Ln
      N
      Nt
      ic
      mh
      wt
      x
      zc

      + Nt

    • writeBatch

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size111 kB112 kB+178 B (+0.2%)
      size-with-ext-deps170 kB171 kB+178 B (+0.1%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      variables

      18 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      19 dependencies

      Bn
      D
      G
      Gn
      Hn
      It
      Jn
      Ln
      N
      Nt
      Uo
      Xn
      ic
      jn
      mh
      mi
      wt
      x
      zc

      + Nt

  • @firebase/functions

    • httpsCallable

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size5.98 kB6.02 kB+38 B (+0.6%)
      size-with-ext-deps21.1 kB21.1 kB+40 B (+0.2%)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      functions

      11 dependencies

      _errorForResponse
      call
      codeForHTTPStatus
      decode
      encode
      failAfter
      httpsCallable
      httpsCallable$1
      mapValues
      postJSON
      registerFunctions

      12 dependencies

      _errorForResponse
      call
      callAtURL
      codeForHTTPStatus
      decode
      encode
      failAfter
      httpsCallable
      httpsCallable$1
      mapValues
      postJSON
      registerFunctions

      + callAtURL

    • httpsCallableFromURL

      Size

      TypeBase (9417675)Merge (9d73ac2)Diff
      size?5.97 kB? (?)
      size-with-ext-deps?21.1 kB? (?)

      Dependency

      TypeBase (9417675)Merge (9d73ac2)Diff
      functions?

      11 dependencies

      _errorForResponse
      callAtURL
      codeForHTTPStatus
      decode
      encode
      failAfter
      httpsCallableFromURL
      httpsCallableFromURL$1
      mapValues
      postJSON
      registerFunctions

      ?
      classes?

      ContextProvider
      FunctionsError
      FunctionsService

      ?
      variables?

      APP_CHECK_INTERNAL_NAME
      AUTH_INTERNAL_NAME
      DEFAULT_REGION
      FUNCTIONS_TYPE
      LONG_TYPE
      MESSAGING_INTERNAL_NAME
      UNSIGNED_LONG_TYPE
      errorCodeMap
      name
      version

      ?
      enums??

      External Dependency

      ModuleBase (9417675)Merge (9d73ac2)Diff
      @firebase/app?

      _registerComponent
      registerVersion

      ?
      @firebase/component?

      Component

      ?
      @firebase/util?

      FirebaseError
      getModularInstance

      ?

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/yVr86mrOTN.html

@@ -78,7 +78,7 @@ export function typeOrder(value: Value): TypeOrder {
if (isServerTimestamp(value)) {
return TypeOrder.ServerTimestampValue;
} else if (isMaxValue(value)) {
return TypeOrder.ArrayValue;
return TypeOrder.ObjectValue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be TypeOrder.MaxValue? Android reference

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

);
await verifyResults(testingQuery, 'coll/val1');
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also add another test (or just add to the existing test) for the other direction? e.g. c < 2 order by c DESC with bound 2 inclusive.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And that uncovers one more bug.

@wu-hui wu-hui merged commit dc0e926 into master Apr 21, 2022
@wu-hui wu-hui deleted the wuandy/FixCursorExpand branch April 21, 2022 18:54
@firebase firebase locked and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants